02. Getting Started

Instructions

Follow the Udacity instructions to launch an EC2 GPU instance . Make sure you have installed the additional libraries described in the instructions for this project.

NOTE: YOU DO NOT NEED TO USE CONDA IN EC2. FOLLOW THE INSTRUCTIONS IN THE CLOUD COMPUTING SETUP LESSON TO CONFIGURE AN EC2 INSTANCE.

Steps 1-5 should be run in the EC2 instance.

  1. Clone the project GitHub repository, and navigate to the downloaded folder:
 git clone https://github.com/udacity/AIND-VUI-Capstone.git
 cd AIND-VUI-Capstone
  1. Download the appropriate subsets of the LibriSpeech dataset, and convert all flac files to wav format.
wget http://www.openslr.org/resources/12/dev-clean.tar.gz
tar -xzvf dev-clean.tar.gz
wget http://www.openslr.org/resources/12/test-clean.tar.gz
tar -xzvf test-clean.tar.gz
mv flac_to_wav.sh LibriSpeech
cd LibriSpeech
./flac_to_wav.sh
  1. Create JSON files corresponding to the train and validation datasets.
cd ..
python create_desc_json.py LibriSpeech/dev-clean/ train_corpus.json
python create_desc_json.py LibriSpeech/test-clean/ valid_corpus.json
  1. Start Jupyter: jupyter notebook --ip=0.0.0.0 --no-browser
  2. Look at the output in the window, and find the line that looks like the following:
Copy/paste this URL into your browser when you connect for the first time to login with a token: 
http://0.0.0.0:8888/?token=3156e...
  1. Copy and paste the complete URL into the address bar of a web browser (Firefox, Safari, Chrome, etc). Before navigating to the URL, replace 0.0.0.0 in the URL with the "IPv4 Public IP" address from the EC2 Dashboard. Press Enter.
  2. Click on vui_notebook.ipynb. Follow the instructions in the notebook.

(Optional) Instructions for Completing the Project on Your Local Machine

This project requires the power of a GPU to run efficiently. If you have your own local GPU that you wish to use for the project, please follow the instructions in the repository README to set up your environment. If you choose to run it in your own local environment, follow these steps.

Environment

  1. Clone the repository, and navigate to the downloaded folder.
 git clone https://github.com/udacity/AIND-VUI-Capstone.git
 cd AIND-VUI-Capstone
  1. Create (and activate) a new environment with Python 3.5 and the numpy package.
conda create --name aind-vui python=3.5 numpy
source activate aind-vui
  1. Install TensorFlow.
pip install tensorflow-gpu==1.1.0
  1. Install a few pip packages.
pip install -r requirements.txt
  1. Switch Keras backend to TensorFlow.
KERAS_BACKEND=tensorflow python -c "from keras import backend"
  1. Obtain the libav package.
sudo apt-get install libav-tools

Data

  1. Obtain the appropriate subsets of the LibriSpeech dataset, and convert all flac files to wav format.
wget http://www.openslr.org/resources/12/dev-clean.tar.gz
tar -xzvf dev-clean.tar.gz
wget http://www.openslr.org/resources/12/test-clean.tar.gz
tar -xzvf test-clean.tar.gz
mv flac_to_wav.sh LibriSpeech
cd LibriSpeech
./flac_to_wav.sh
  1. Create JSON files corresponding to the train and validation datasets.
cd ..
python create_desc_json.py LibriSpeech/dev-clean/ train_corpus.json
python create_desc_json.py LibriSpeech/test-clean/ valid_corpus.json

Notebook

  1. Start Jupyter:
jupyter notebook --ip=0.0.0.0 --no-browser
  1. Look at the output in the window, and find the line that looks like the following:
Copy/paste this URL into your browser when you connect for the first time to login with a token: 
http://0.0.0.0:8888/?token=3156e...
  1. Copy and paste the complete URL into the address bar of a web browser (Firefox, Safari, Chrome, etc). Press Enter.
  2. Click on vui_notebook.ipynb. Follow the instructions in the notebook.

NOTE: While some code has already been implemented to get you started, you will need to implement additional functionality to successfully answer all of the questions included in the notebook. Unless requested, do not modify code that has already been included.